<template>
    <div class="programModify">
        <el-form 
            ref="ruleForm" 
            label-width="60px"
            :model="ruleForm"
            :rules="rules">
            <el-form-item label="名称" prop="name">
                <el-input  v-model="ruleForm.name" ></el-input>
            </el-form-item>
        </el-form>
       <el-button @click="submitForm('ruleForm')" size="medium" class="addSubimit">提交</el-button>
    </div>
</template>
<script>
import { AddData } from '@/assets/js'
export default {
    data(){
        return {
            ruleForm:{
                name:'',   
            },
            rules:{
                name:[
                    { required: true, message: '请输入活动名称', trigger: 'blur' }
                ]
            }
        }
    },
    methods:{
        submitForm:function(e){
            let data = {
                appname:this.ruleForm.name
            }
            AddData(this,e,data,'program/addProgram')
        }
    }
}
</script>